import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { createVNode as _createVNode } from "vue";
import { computed, defineComponent } from 'vue';
import PropTypes from '../_util/vue-types';
import useConfigInject from '../_util/hooks/useConfigInject';
export default defineComponent({
  name: 'SInputGroup',
  props: {
    prefixCls: PropTypes.string,
    size: {
      type: String
    },
    compact: PropTypes.looseBool,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onFocus: {
      type: Function
    },
    onBlur: {
      type: Function
    }
  },
  setup: function setup(props, _ref) {
    var slots = _ref.slots;

    var _useConfigInject = useConfigInject('input-group', props),
        prefixCls = _useConfigInject.prefixCls,
        direction = _useConfigInject.direction;

    var cls = computed(function () {
      var _ref2;

      var pre = prefixCls.value;
      return _ref2 = {}, _defineProperty(_ref2, "".concat(pre), true), _defineProperty(_ref2, "".concat(pre, "-lg"), props.size === 'large'), _defineProperty(_ref2, "".concat(pre, "-sm"), props.size === 'small'), _defineProperty(_ref2, "".concat(pre, "-compact"), props.compact), _defineProperty(_ref2, "".concat(pre, "-rtl"), direction.value === 'rtl'), _ref2;
    });
    return function () {
      var _a;

      return _createVNode("span", {
        "class": cls.value,
        "onMouseenter": props.onMouseEnter,
        "onMouseleave": props.onMouseLeave,
        "onFocus": props.onFocus,
        "onBlur": props.onBlur
      }, [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]);
    };
  }
});